import { createApp } from 'vue'
import App from './App.vue'
import router from "./router/index";
import { createPinia } from "pinia";
import PiniaPluginPesisted from "pinia-plugin-persistedstate";
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import 'element-plus/theme-chalk/dark/css-vars.css'

const pinia = createPinia();
pinia.use(PiniaPluginPesisted);
const app = createApp(App);

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }

createApp(App).use(router).use(ElementPlus)
.use(pinia).mount('#app')
